package com.zhanggm.student.thread;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

/**
 * @author Administrator
 */
@Slf4j
public class MyThread implements Runnable {
    @SneakyThrows
    @Override
    public void run() {
        while (true) {
            String name = Thread.currentThread().getName();
            log.info("线程运行中:{}",name);
            Thread.sleep(100000);
        }
    }

    public static void main(String[] args) {
        log.info("主线程启动");
        new Thread(new MyThread()).start();
        new Thread(new MyThread()).start();
        new Thread(new MyThread()).start();
    }
}
